#include <stdio.h>
#include "../../src/gtthread.h"
#include <stdint.h>

char g_str[] = "hello world\n";

void* worker(void* arg)
{
	int id = (intptr_t)arg;
	volatile int i=0;
	int j;
	
	for(j=0;j<5;j++)
	{
	for(i=0;i<100000000;i++);
	printf("thread  %d work\n", id);
	}
}

int main()
{
	gtthread_t th1, th2;
	void* ret;
	volatile int i=0;

	gtthread_init(1000);

	gtthread_create(&th1, worker, (void*)1);
	gtthread_create(&th2, worker, (void*)2);

	for(;;);
}
